<html>
<head><meta charset="utf-8"><title>Name confusion · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Name.20confusion.html">Name confusion</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206395511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Name%20confusion/near/206395511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Name.20confusion.html#206395511">(Aug 09 2020 at 13:40)</a>:</h4>
<p>TIL that we do not just have <code>ConstValue</code> and <code>Const</code>, but also <code>Constant</code>. Those are three different things. I get the feeling our naming could be improved...^^</p>



<a name="206428862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Name%20confusion/near/206428862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Name.20confusion.html#206428862">(Aug 10 2020 at 05:16)</a>:</h4>
<p>I'm fairly certain that a couple years ago we had a couple more const types just for fun. At least we are improving!</p>



<a name="206438141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Name%20confusion/near/206438141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Name.20confusion.html#206438141">(Aug 10 2020 at 08:23)</a>:</h4>
<p>we should rename <code>Constant</code> to <code>Const</code> and mention them as <code>ty::Const</code> and <code>mir::Const</code></p>



<a name="206438168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Name%20confusion/near/206438168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Name.20confusion.html#206438168">(Aug 10 2020 at 08:23)</a>:</h4>
<p><code>ConstValue</code> will be where the valtree lives, so we could at that point rename it to <code>ConstValTree</code></p>



<a name="206440981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Name%20confusion/near/206440981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Name.20confusion.html#206440981">(Aug 10 2020 at 09:08)</a>:</h4>
<p><span class="user-mention silent" data-user-id="124288">oli</span> <a href="#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Name.20confusion/near/206438141">said</a>:</p>
<blockquote>
<p>we should rename <code>Constant</code> to <code>Const</code> and mention them as <code>ty::Const</code> and <code>mir::Const</code></p>
</blockquote>
<p>no... a <code>Constant</code> is a <code>ty::Const</code> with an additional "user type annotation"</p>



<a name="206441001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Name%20confusion/near/206441001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Name.20confusion.html#206441001">(Aug 10 2020 at 09:08)</a>:</h4>
<p><code>ty::Const</code> will keep its name with valtrees I think (we just drop the <code>ByRef</code> variant in favor of something that contains a list of child nodes)</p>



<a name="206450891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/Name%20confusion/near/206450891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/Name.20confusion.html#206450891">(Aug 10 2020 at 11:31)</a>:</h4>
<p>Looks like we have some more name confusion than I was realizing, <a href="https://github.com/rust-lang/rust/issues/72396#issuecomment-671285513">see the GH discussion</a>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>